package com.gitee.tianchaohongyu.jdcl.exception;

/**
 * 包装反射操作异常的非检查异常
 */
public class ReflectWeakException extends RuntimeException {
  private static final String DEFAULT_MESSAGE = "反射操作发生异常:";

  public ReflectWeakException(String message) {
    super(message);
  }

  public ReflectWeakException(ReflectiveOperationException cause) {
    super(DEFAULT_MESSAGE + (cause.getMessage() == null && cause.getCause() != null ? cause.getCause().getMessage() : cause.getMessage()), cause);
  }

  public ReflectWeakException(String message, ReflectiveOperationException cause) {
    super(message, cause);
  }
}